<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="__STATIC__/mobile/css/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/mobile/css/main.css"/>

    <include file="Public:iframe_header"/>
    <style type="text/css">
        *{
            font-size: 95%;
            font-family: "微软雅黑";
        }
        .r-div{
            padding-top: 30px;
            width: 100%;
        }
        input[type=text],input[type=password]{
            padding: 8px;
            margin: 10px auto;
            width: 70%;
            border: 1px solid #F9BC30;
            background-color: #fff;
            font-size: 14px;
            border-radius: 0px;
            height:34px;
        }
        p{
            color: #F0AD4E;
            font-size: 20px;
        }
        input[type=button]{
            width: 70%;
            color: black;
            background-color: #F9BB30;
            border: 1px solid #F9BC30;
            margin: 10px auto;
            height:34px;
            border-radius: 0px;
        }
        html{
            background-image: url(__STATIC__/mobile/img/z-bg.png);
            background-size: cover;
            background-size: 100% 100%;
            background-repeat: no-repeat;
            background-position: center;
            width: 100%;
            min-height: 100%;
            height: auto;
            padding: 0;
            margin: 0;
        }
        body{
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0;
            background-color: rgba(0,0,0,0);
        }
        div{
            width: auto;
            padding: 0;
            margin: 0;
            text-align: center;
        }
        .mui-content{
            background-color: rgba(0,0,0,0);
        }
        .yzm{
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0;
            padding: 0;
        }
        .yzm input{
            padding: 8px;
            margin: 10px 0 10px auto;
            width: 40%;
            border: 1px solid #F9BC30;
            background-color: #fff;
            font-size: 14px;


        }
        .yzm img{
            margin: 10px auto 10px 0;
            padding:auto 0;
            width: 30%;
            border: 1px solid #F9BC30;
        }

    </style>

</head>

<body>

<div class="mui-content"  align="center">
    <div class="r-div">
        <p>欢迎登录</p>
        <div class="">
            <input placeholder="请输入账号" type="text" name="account" id="account" value="" /><br />
        </div>
        <div class="yzm">
            <input placeholder="验证码" type="text" name="verifyCode" id="verifyCode" value="" />
            <img src="/mobile/Login/captchaImg" height="34px" class="vcode" title="换一张" />
        </div>
        <div class="">
            <input placeholder="请输入密码" type="password" name="passwd" id="passwd" value="" /><br />
            <input type="button" name="" id="btn_login" value="登录" />
            <!--
                作者：offline
                时间：2018-06-26
                描述：
                <input type="button" name="" id="" value="返回" onclick="back()"/><br />
            -->

        </div>
        <br />

		    	<span id="">
		    		没有账号！
		    	</span>
		    	<span id="" style="color: #EC971F" onclick="toregister()">
		    		立即注册
		    	</span>
    </div>



</div>
<script src="__STATIC__/mobile/js/mui.min.js"></script>
<script type="text/javascript">
    mui.init();
    function back(){
        window.history.go(-1);
    }
    function toregister(){
        window.parent.document.getElementById("ifpage").src = "{:url('Login/zregister')}";
    }
</script>

<script>
    $(".vcode").click(function(){
        if( $(this).attr("src").indexOf('?')>0){
            $(this).attr("src", $(this).attr("src")+'&random='+Math.random());
        }else{
            $(this).attr("src", $(this).attr("src").replace(/\?.*$/,'')+'?'+Math.random());
        }
    });

    $("#btn_login").click(function(){

        if($("#account").val()==""){
            parent.tips('账号不能为空');
            return false;
        }
        if($("#verifyCode").val()==""){
            parent.tips('验证码不能为空');
            return false;
        }
        if($("#passwd").val()==""){
            parent.tips('密码不能为空');
            return false;
        }

        var account = $("input[name='account']").val();
        var passwd = $("input[name='passwd']").val();
        var verifyCode = $("input[name='verifyCode']").val();

        $.post("{:url('Login/login_do')}",{account:account,passwd:passwd,verifyCode:verifyCode},function(result){
            if(result.code == '0'){
                parent.tips(result.msg);
                return false;
            }else{
                parent.tips(result.msg);
                parent.location.href=result.url;
            }
        });
        return false;
    });
</script>
</body>

</html>